<?php
App::uses('Helper', 'View');
class CustomHelper extends Helper{
    
    public function descriptionProduct($string,$length = 300){
        $string = strip_tags($string);
        if(strlen($string) > $length){
            $string = substr($string, 0,$length);
            return substr($string, 0,strrpos($string,' '))." ...";
        }
        return $string;
    }
}